#include "udp_server.hpp"
#include "Command.hpp"
int main(int argc,char* argv[]){
    CommandClass con;
    // ENABLEFILESTRATEGY();
    if (argc != 2){
        LOG(FATAL) << "Use error, Please use ./server + port";
        exit(-1);
    }
    shared_ptr<udp_server> us = make_shared<udp_server>(stoi(argv[1]));
    us->Register([&con](string&cmd){
        return con.CommandStr(cmd);
    });
    us->Init();
    us->Start();
    return 0;
}
